/*
	Velocity2: A class that generates a rigib body rotation within the grid
			   It is used for testing the functionality of the library
*/

#ifndef VELOCITY_H
#define VELOCITY_H

//#include "main.h"
#include "vector.h"
#include "grid.h"
#include "matrix.h"
class Velocity
{
public:
   int cont;
   Grid gridU;
   Grid gridV;
   Grid gridW;
  // Matrix <double> U;
   //Matrix <double> V;
   //Matrix <double> W;
	Velocity(int nx,int ny, int nz):gridU(nx, ny, nz),gridV(nx, ny, nz),gridW(nx, ny, nz)
	{	}
   
	inline void GetVelocity(const Vector &pos, Vector &u) const
	{
		//vortex around 0,0,1
		u = Vector( gridU[int (pos[0])],gridV[int (pos[1])], gridW[int (pos[2])]);
      //if(cont ==0) cout<< "(" << u[0] << "," << u[1] << "," << u[2] << ")  ";
	}
};
class Velocity_Vector
{
public:
   int cont;
   Grid_Vector gridUVW[4];
  // Matrix <double> U;
   //Matrix <double> V;
   //Matrix <double> W;
	Velocity_Vector(int nx,int ny, int nz):gridUVW(0,nx, ny, nz),gridUVW(1,nx, ny, nz),gridUVW(2,nx, ny, nz)
	{	}
   
	inline void GetVelocity_Vector(const Vector &pos, Vector &u) const
	{
		//vortex around 0,0,1
		u = Vector( gridUVW[0][int (pos[0])][int (pos[1])][int (pos[2])],
                  gridUVW[1][int (pos[0])][int (pos[1])][int (pos[2])],
                  gridUVW[2][int (pos[0])][int (pos[1])][int (pos[2])],;
      //if(cont ==0) cout<< "(" << u[0] << "," << u[1] << "," << u[2] << ")  ";
	}
};

#endif
